package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.MemberCardCancelEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 后台退卡（取消福利卡发放） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-08-22 19:47:33
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberCardCancelQuery extends MemberCardCancelEntity implements Query<MemberCardCancelEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员ID（冗余ID）查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员钱包ID（冗余ID）查询条件 */
	@JsonUnwrapped(prefix = "memberWalletId")
	private Condition<String> memberWalletIdCondition;

    /** 悦卡模板ID查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 会员悦卡ID查询条件 */
	@JsonUnwrapped(prefix = "memberCardId")
	private Condition<String> memberCardIdCondition;

    /** 退卡人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 退卡时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 退卡原因查询条件 */
	@JsonUnwrapped(prefix = "reason")
	private Condition<String> reasonCondition;

    /** 退款金额查询条件 */
	@JsonUnwrapped(prefix = "remain")
	private Condition<BigDecimal> remainCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberCardCancelQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberCardCancelQuery(MemberCardCancelEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberCardCancelQuery(MemberCardCancelQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberWalletIdCondition != null) {
			this.memberWalletIdCondition = other.memberWalletIdCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.memberCardIdCondition != null) {
			this.memberCardIdCondition = other.memberCardIdCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.reasonCondition != null) {
			this.reasonCondition = other.reasonCondition.copy();
		}
		if(other.remainCondition != null) {
			this.remainCondition = other.remainCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberCardCancelEntity> toQueryWrapper() {
		QueryWrapper<MemberCardCancelEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberWalletIdCondition != null) {
			memberWalletIdCondition.toWrapper(wrapper, COL_MEMBER_WALLET_ID);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (memberCardIdCondition != null) {
			memberCardIdCondition.toWrapper(wrapper, COL_MEMBER_CARD_ID);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (reasonCondition != null) {
			reasonCondition.toWrapper(wrapper, COL_REASON);
		}
		if (remainCondition != null) {
			remainCondition.toWrapper(wrapper, COL_REMAIN);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员ID（冗余ID）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID（冗余ID）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID（冗余ID）查询条件
	 * 
	 * @param memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员钱包ID（冗余ID）查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID（冗余ID）查询条件
	 */
	public Condition<String> memberWalletId() {
		this.memberWalletIdCondition = new Condition<>();
		return this.memberWalletIdCondition;
	}
	
	/**
	 * 获取会员钱包ID（冗余ID）查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID（冗余ID）查询条件
	 */
	public Condition<String> getMemberWalletIdCondition() {
		return memberWalletIdCondition;
	}

	/**
	 * 设置会员钱包ID（冗余ID）查询条件
	 * 
	 * @param memberWalletIdCondition 会员钱包ID（冗余ID）查询条件
	 */
	public void setMemberWalletIdCondition(Condition<String> memberWalletIdCondition) {
		this.memberWalletIdCondition = memberWalletIdCondition;
	}

	/**
	 * 构造并返回悦卡模板ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡模板ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡模板ID查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回会员悦卡ID查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡ID查询条件
	 */
	public Condition<String> memberCardId() {
		this.memberCardIdCondition = new Condition<>();
		return this.memberCardIdCondition;
	}
	
	/**
	 * 获取会员悦卡ID查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡ID查询条件
	 */
	public Condition<String> getMemberCardIdCondition() {
		return memberCardIdCondition;
	}

	/**
	 * 设置会员悦卡ID查询条件
	 * 
	 * @param memberCardIdCondition 会员悦卡ID查询条件
	 */
	public void setMemberCardIdCondition(Condition<String> memberCardIdCondition) {
		this.memberCardIdCondition = memberCardIdCondition;
	}

	/**
	 * 构造并返回退卡人查询条件
	 * 
	 * @return createdByCondition 退卡人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取退卡人查询条件
	 * 
	 * @return createdByCondition 退卡人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置退卡人查询条件
	 * 
	 * @param createdByCondition 退卡人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回退卡时间查询条件
	 * 
	 * @return createdTimeCondition 退卡时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取退卡时间查询条件
	 * 
	 * @return createdTimeCondition 退卡时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置退卡时间查询条件
	 * 
	 * @param createdTimeCondition 退卡时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回退卡原因查询条件
	 * 
	 * @return reasonCondition 退卡原因查询条件
	 */
	public Condition<String> reason() {
		this.reasonCondition = new Condition<>();
		return this.reasonCondition;
	}
	
	/**
	 * 获取退卡原因查询条件
	 * 
	 * @return reasonCondition 退卡原因查询条件
	 */
	public Condition<String> getReasonCondition() {
		return reasonCondition;
	}

	/**
	 * 设置退卡原因查询条件
	 * 
	 * @param reasonCondition 退卡原因查询条件
	 */
	public void setReasonCondition(Condition<String> reasonCondition) {
		this.reasonCondition = reasonCondition;
	}

	/**
	 * 构造并返回退款金额查询条件
	 * 
	 * @return remainCondition 退款金额查询条件
	 */
	public Condition<BigDecimal> remain() {
		this.remainCondition = new Condition<>();
		return this.remainCondition;
	}
	
	/**
	 * 获取退款金额查询条件
	 * 
	 * @return remainCondition 退款金额查询条件
	 */
	public Condition<BigDecimal> getRemainCondition() {
		return remainCondition;
	}

	/**
	 * 设置退款金额查询条件
	 * 
	 * @param remainCondition 退款金额查询条件
	 */
	public void setRemainCondition(Condition<BigDecimal> remainCondition) {
		this.remainCondition = remainCondition;
	}

}
